<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.Format"%>
<%
	String title = "Change password";
	String description = "Change password.We provide web site monitoring to webmasters. Monitor your web site is availability 24 hours a day, 7 days a week with instant email alerts and weekly web site performance statistics.";
	String keywords = "account,monitoring domain,firstping,statistics site,add site";
	String[] check = (String[]) request.getAttribute("check");
	String success = (String) request.getAttribute("success");
%>
<jsp:include page="layout/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
	<jsp:param name="description" value="<%=description %>" />
	<jsp:param name="keywords" value="<%=keywords %>" />
</jsp:include>
<div id="mainpage">
	<div id="maincontent">
		<h1>Change password</h1>
		<div class="box-wrapper">
			<div class="accountinfo">
				<div class="leftside">
					<div class="change-password">
						<%=(success != null) ? "<p style='color:blue;'>" + success + "</p>" : ""%>
						<form action="/change-password" method="post" class='form'>
							<div>
								<span>Old Password : </span>
								<%=(check[0] != null) ? "<p style='color:red;'>" + check[0] + "</p>" : ""%>
								<div><input type="password" name="old_pwd"<%=(check[0] != null) ? "style='border:1px solid red;'" : ""%> /></div>
								<span>New Password : </span>
								<%=(check[1] != null) ? "<p style='color:red;'>" + check[1] + "</p>" : ""%>
								<div><input type="password" name="new_pwd" <%=(check[1] != null) ? "style='border:1px solid red;'" : ""%> /></div>
								<span>Confirm Password : </span>
								<%=(check[2] != null) ? "<p style='color:red;'>" + check[2] + "</p>" : ""%>
								<div><input type="password" name="re_pwd" <%=(check[2] != null) ? "style='border:1px solid red;'" : ""%> /></div>
								<button class="button-style">Change</button>
							</div>
						</form>
						<div class="change-password-des">
							<h2>Change your password</h2>
							<p>Type your old password and the new password that you want in the form to change your current password</p>
						</div>
						<div class="clearbreak"></div>
					</div>
				</div>
				<div class="rightside">
					<h2>My Account</h2>
					<ul>

						<li class="subinfo"><strong>Exp date</strong> : <%
							Format formatter = new SimpleDateFormat("MM/dd/yy");
							String s = formatter.format(session.getAttribute("exp"));
							out.print(s);
						%> <br /> <strong>Type</strong> : <%=session.getAttribute("type")%>
							<br /> <strong>Request</strong> : <%=session.getAttribute("req")%>
							Minutes <a class="button-style" href="/update">Update Account</a>
						</li>
						<li><a href="/account">Account</a></li>
						<li><a href="/add-site">Add site</a></li>
						<li><a href="/change-password">Change password</a></li>
						<li><a href="/logout">Logout</a></li>
					</ul>
				</div>

				<div class="clearbreak"></div>
			</div>
		</div>
	</div>
</div>
<jsp:include page="/layout/footer.jsp">
	<jsp:param name="language" value="1" />
</jsp:include>
